from django.db import models

# Create your models here.
class ChatProduct(models.Model):
    """
    ChatProduct
    """
    id = models.BigAutoField(primary_key=True)
    name = models.CharField(verbose_name="产品名称", max_length=128, blank=False, null=False)
    price = models.FloatField(verbose_name="产品价格", blank=False, null=False)
    discount = models.FloatField(verbose_name="产品折扣", blank=False, null=False)
    days = models.IntegerField(verbose_name="产品天数", blank=False, null=False, default=0)
    power = models.IntegerField(verbose_name="产品算力", blank=False, null=False, default=0)
    enabled = models.BooleanField(verbose_name="启用状态", blank=False, null=False, default=True)
    sales = models.IntegerField(verbose_name="产品销量", blank=False, null=False, default=0)
    sort_num = models.IntegerField(verbose_name="产品排序", blank=False, null=False, default='99')

    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)
